package com.noahplat.erp.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 变更申请类
 *
 * @author
 * @version 1.0.0
 * @Date: 2021/2/28 15:05
 **/
@Data
@Table(name = "tb_erp_alter")
public class AccountAlter {

    @Id
    private Long id;

    //用户申请Id
    private Long uid;

    //变更成的账套Id
    @Column(name = "acct_id")
    private Long acctId;

    //变更类型 0： 零售->企业  1： 企业->零售
    @Column(name = "alter_type")
    private String alterType;

    //变更状态 0: 待处理 1：已处理  2：已驳回
    private String status;

    //处理备注
    private String remarks;

    //申请日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "alter_date")
    private Date alterDate;

    //处理日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "deal_date")
    private Date dealDate;

    //处理人
    @Column(name = "alter_name")
    private String alterName;

    @Column(name = "is_del")
    private String isDel; //是否删除 Y：已删除 N:未删除

    //申请人名称
    @Transient
    private String applyName;

    @Transient
    private String applyAccount;

}
